<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="${pageContext.request.contextPath}/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/css/animate.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/css/style.min.css?v=4.1.0" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/css/bootstrap-fileinput/fileinput.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/jQuery-Validation/css/validationEngine.jquery.css" rel="stylesheet">
    <style type="text/css">
        .formErrorContent{
            color: red;
        }
    </style>
</head>

<body class="gray-bg">
<div class="formErrorContent"></div>
<div class="container" style="margin-top: 50px">
    <form class="form-horizontal" role="form" id="editSalesmanForm" autocomplete="off">
            <input type="hidden" name="salesmanId" id="salesmanId">
            <!-- <input type="hidden" name="salesmanName"> -->
            <div class="form-group">
                <label class="col-sm-4 control-label">用户名:</label>
                <div class="col-sm-4">
                    <input data-prompt-position="topRight" type="text"
                    class="form-control validate[required,minSize[5],maxSize[12],custom[onlyLetterNumber],ajax[customAjaxValidity]]"
                           name="salesmanName" id="salesmanName" placeholder="用户名" autocomplete="off" AutoCompleteType="Disabled">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-4 control-label">真实姓名:</label>
                <div class="col-sm-4">
                    <input data-prompt-position="topRight" type="text" class="form-control validate[required]"
                           name="salesmanRealName" id="salesmanRealName" placeholder="真实姓名">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-4 control-label">密码:</label>
                <div class="col-sm-4">
                    <input data-prompt-position="topRight" class="form-control validate[required,custom[checkPassword]]" 
                    	name="salesmanPwd" id="salesmanPwd" placeholder="登录密码" autocomplete="off" AutoCompleteType="Disabled">	
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-4 control-label">联系方式:</label>
                <div class="col-sm-4">
                    <input data-prompt-position="topRight" type="text" class="form-control validate[required]" name="salesmanPhone" 
                    		id="salesmanPhone" placeholder="联系方式">	
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-4 control-label">业务员类型:</label>
                <div class="col-sm-4">
                    <select class="form-control validate[required]" id="salesmanType" name="salesmanType">
                    	<option value="">-请选择-</option>
                    	<option value="1">开单</option>
                    </select>
                </div>
            </div>	
            <div class="form-group">
                <label class="col-sm-4 control-label">入职时间:</label>
                <div class="col-sm-4">
                    <input data-prompt-position="topRight" type="text" class="form-control" name="salesmanJoinTime" 
                    			 id="salesmanJoinTime" placeholder="入职时间">	
                </div>
            </div>	
            <div class="form-group">
               <label class="col-sm-4 control-label">省市区:</label>
               <div class="form-inline col-sm-8">
			       <div data-toggle="distpicker">
				       <div class="form-group" style="margin-left:0;">
				          <label class="sr-only" for="province3">Province</label>
				          <select class="form-control" id="province3"></select>
				       </div>
				       <div class="form-group">
				          <label class="sr-only" for="city3">City</label>
				          <select class="form-control" id="city3"></select>
				       </div>
				       <div class="form-group">
				          <label class="sr-only" for="district3">District</label>
				          <select class="form-control" id="district3"></select>
				       </div>
			       </div>
		       </div>
            </div> 
            <div class="form-group">
                <label class="col-sm-4 control-label">详细地址:</label>
                <div class="col-sm-4">
                    <input data-prompt-position="topRight" type="text" class="form-control" name="salesmanAddr" id="address" placeholder="详细地址">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-4 control-label">角色:</label>
                <div class="col-sm-4">
                    <select data-prompt-position="topRight" class="form-control validate[required]" id="salesmanRoleId" name="salesmanRoleId">
                    	<option value="">-请选择-</option>
                    </select>
                </div>
            </div>
            <shiro:hasPermission name="company:getsysuser">
            <div class="form-group">
                <label class="col-sm-4 control-label">所属公司:</label>
                <div class="col-sm-4">
                    <select data-prompt-position="topRight" class="form-control validate[required]" id="salesmanComnum" name="salesmanComnum">
                    	<option value="">-请选择-</option>
                    </select>
                </div>
            </div>
            </shiro:hasPermission>
            <div class="form-group" style="margin-left: 75px;margin-top: 50px">
                <div class="col-sm-6 control-label">
                    <button type="button" class="btn btn-default" onclick="closeForm();">关闭</button>
                    &nbsp;&nbsp;&nbsp;&nbsp;<button type="submit" class="btn btn-primary"  id="save" >保存</button>
                </div>
            </div>
    </form>
</div>
    
<script src="${pageContext.request.contextPath}/js/jquery.min.js?v=2.1.4"></script>
<script src="${pageContext.request.contextPath}/js/bootstrap.min.js?v=3.3.6"></script>
<script src="${pageContext.request.contextPath}/js/content.min.js?v=1.0.0"></script>
<script src="${pageContext.request.contextPath}/js/plugins/layer/layer.min.js"></script>
<script src="${pageContext.request.contextPath}/js/public/ttbj-core.js"></script>
<script src="${pageContext.request.contextPath}/laydate5.0.7/laydate.js"></script>
<script src="${pageContext.request.contextPath}/jQuery-Validation/js/jquery.validationEngine.js"></script>
<script src="${pageContext.request.contextPath}/jQuery-Validation/js/jquery.validationEngine-zh_CN.js"></script>
<script src="${pageContext.request.contextPath}/js/business/sysuser/js/distpicker.data.js"></script>
<script src="${pageContext.request.contextPath}/js/business/sysuser/js/distpicker.js"></script>
<script src="${pageContext.request.contextPath}/js/business/sysuser/edit_sysuser.js"></script>
<script type="text/javascript">
$(function(){

	if(navigator.userAgent.toLowerCase().indexOf("chrome") != -1){
		var inputers = document.getElementsByTagName("input");
		for(var i=0;i<inputers.length;i++){
			if((inputers[i].type !== "submit") && (inputers[i].type !== "password")){
				var input = inputers[i];
				var inputName = inputers[i].name;
				var inputid = inputers[i].id;
				inputers[i].removeAttribute("name");
				inputers[i].removeAttribute("id");
				setTimeout(function(){
					input.setAttribute("name",inputName);
					input.setAttribute("id",inputid);
				},1)
			}
		}
	}
});
</script>
</body>
</html>